1. Field of the Invention
The present invention relates to a nonvolatile memory, and more particularly to a nonvolatile memory which stores data from a memory cell in which an error is detected, in a redundant cell (reserved cell).
2. Description of the Related Art
Nonvolatile semiconductor memory such as EEPROM and flash memory can be electrically erased or written over, and because the data is not deleted even though the power is turned off, these devices are used in many applications such as portable phones, digital cameras, and personal computer BIOS memory or the like. With this type of nonvolatile semiconductor memory device, a charge is accumulated in a memory cell floating gate and data is stored by changing the cell threshold value. In order to read the data, a current is supplied to the cell, and the data stored in the memory cell can be read by detecting the current value (or threshold value thereof).
When memory cells become smaller in conjunction with miniaturization, the amount of charge (generally the number of electrons) accumulated in the floating gate is reduced. The number of electrons accumulated at the floating gate can simply be expressed by the following equation. If only ΔVFG is changed by the influx (efflux) of electrons by the electric potential of the floating gate, the number of influx (efflux) electrons of the floating gate is expressed by the following equation.N=(1/e)×CFG×ΔVFG
In this equation, CFG is the capacity of the floating gate, and has a proportional relationship to the floating gate electrode size L×W.CFG∝L×W
In conjunction with miniaturization, CFG is reduced, and the width of ΔVFG, which is used for the logical determination, become smaller by reducing the voltage and making multi-valued. Prior to use, (particularly when using as ROM), the number of electrons in the floating gate will be reduced, and if a threshold voltage (flag) that is used for a specific logical determination is exceeded, wrong information will be stored. Therefore, when this cell is “read”, the mistaken data will be read and a “software error” will occur. It is thought that this type of phenomenon will become more marked in multi-value cells where the threshold value which makes a prescribed logical determination is narrow.
Methods to rescue data from defective cells are known where the defective cells are rescued by so-called redundancy circuits which are performed prior to shipping the product. However, software errors caused by the reduction in the number of electrons at the floating gate during use as described above can not generally be detected prior to shipping the product. Furthermore, methods to determine defective cells using ECC (Error Check Correct) process and then to restore the properties of the cell, are widely known. However, ECC process requires a fair amount of process time so normal operation of the memory device is delayed. Furthermore, an ECC circuit must be added in order to perform ECC process, which leads to increased chip area.
On the other hand, a change in the threshold voltage because of a change in the number of electrons of the aforementioned floating gate was highlighted in patent literature 1. In nonvolatile memory, a change in the data can occur during use because of “data leak” where an electric charge passes slowly through an oxide film. Therefore, nonvolatile memory which better prevents storage data conversion by shifting the threshold value of the transistor has been proposed in Japanese Patent Application Laid-open No. H9-320289.
These proposed semiconductor nonvolatile memory devices, in order to read the data, determine whether or not a pre-charged bit line voltage (VBL) is between a reference level VL and a middle level VM, or between a reference level VH and a middle level VM, and rewrite “1” or “0” in the memory cell where the data was read. Therefore, problems with inverting of stored data can be prevented beforehand by a shift in the cell transistor threshold value.
It has now been discovered that, with the aforementioned conventional semiconductor nonvolatile memory, changing of the stored data caused by a reduction in the number of electrons at the floating gate can be prevented. However, there is variation in the degree of the reduction of the number of electrons at the floating gate, depending on the cell. Generally, cells which have a large reduction in the number of electrons will again have a large reduction in the number of electrons after the data is rewritten. Therefore, the inefficient rewriting of the data to the same cell must be repeatedly performed.
Furthermore, with this conventional technique, cell checking and rewriting is performed while the CPU is not accessing the EEPROM such as when the power is turned on or when the system is shut down. Therefore, the frequency of cell check is limited, and there are cases where each cell cannot be inspected at the necessary frequency.